package com.dpteam.bean;

/**
 * Created with IntelliJ IDEA.
 * User: luolei
 * Date: 2016/1/8
 * Time: 18:30
 */
public class OrderItemInfo {

    /**
     *
     */
    private int id;
    /**
     *
     */
    private int productId;
    /**
     *
     */
    private String barcode;
    /**
     *
     */
    private String productName;
    /**
     *
     */
    private String typeName;
    /**
     *
     */
    private String description;
    /**
     *
     */
    private int productNum;
    /**
     *
     */
    private float discount = 1;
    /**
     *
     */
    private float profitTotal;
    /**
     *
     */
    private float sellPriceTotal;

    /**
     * 单个售价
     */
    private float perSellPrice;

    public OrderItemInfo() {
    }

    public OrderItemInfo(int id, int productId, String barcode, String productName, String typeName, String description, int productNum, float discount, float profitTotal, float sellPriceTotal) {
        this.id = id;
        this.productId = productId;
        this.barcode = barcode;
        this.productName = productName;
        this.typeName = typeName;
        this.description = description;
        this.productNum = productNum;
        this.discount = discount;
        this.profitTotal = profitTotal;
        this.sellPriceTotal = sellPriceTotal;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder("{");
        //String
        sb.append("'barcode':'").append(barcode).append("',");
        sb.append("'productName':'").append(productName).append("',");
        sb.append("'typeName':'").append(typeName).append("',");
        sb.append("'description':'").append(description).append("',");
        //int
        sb.append("'id':").append(id).append(",");
        sb.append("'perSellPrice':").append(perSellPrice).append(",");
        sb.append("'productId':").append(productId).append(",");
        sb.append("'productNum':").append(productNum).append(",");
        sb.append("'discount':").append(discount).append(",");
        sb.append("'profitTotal':").append(profitTotal).append(",");
        sb.append("'sellPriceTotal':").append(sellPriceTotal).append("}");
        return sb.toString();
    }

    public float getPerSellPrice() {
        return perSellPrice;
    }

    public void setPerSellPrice(float perSellPrice) {
        this.perSellPrice = perSellPrice;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getProductId() {
        return productId;
    }

    public void setProductId(int productId) {
        this.productId = productId;
    }

    public String getBarcode() {
        return barcode;
    }

    public void setBarcode(String barcode) {
        this.barcode = barcode;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public int getProductNum() {
        return productNum;
    }

    public void setProductNum(int productNum) {
        this.productNum = productNum;
    }

    public float getDiscount() {
        return discount;
    }

    public void setDiscount(float discount) {
        this.discount = discount;
    }

    public float getProfitTotal() {
        return profitTotal;
    }

    public void setProfitTotal(float profitTotal) {
        this.profitTotal = profitTotal;
    }

    public float getSellPriceTotal() {
        return sellPriceTotal;
    }

    public void setSellPriceTotal(float sellPriceTotal) {
        this.sellPriceTotal = sellPriceTotal;
    }
}
